import { defineStore } from 'pinia';
import { store } from '../index'

export const useCatalog = defineStore('catalog', {
	state: () => {
		return {
			catalog: [],//考题
		};
	},
	getters: {
		getCatalog: (state) => {
			return state.catalog
		}
	},
	actions: {
		setCatalog(data : any) {
			this.catalog = data
		},
		reomveCatalog() {
			this.catalog = []
		},
	},
});

export const useCatalogWithOut = () => {
	return useCatalog(store)
}